import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class IODemo4 {
    public static void main(String[] args) throws IOException {
        //true表示追加
        try(OutputStream outputStream=new FileOutputStream("./test.txt",true)){
            byte[] buffer=new byte[]{97,98,99,100};
            outputStream.write(buffer);
        }
    }
}